package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DoctorServerMapper;
import com.ruoyi.system.domain.DoctorServer;
import com.ruoyi.system.service.IDoctorServerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 专家服务分配Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-11
 */
@Service("doctorserver")
public class DoctorServerServiceImpl implements IDoctorServerService 
{
    @Autowired
    private DoctorServerMapper doctorServerMapper;

    /**
     * 查询专家服务分配
     * 
     * @param id 专家服务分配主键
     * @return 专家服务分配
     */
    @Override
    public DoctorServer selectDoctorServerById(Long id)
    {
        return doctorServerMapper.selectDoctorServerById(id);
    }

    /**
     * 查询专家服务分配列表
     * 
     * @param doctorServer 专家服务分配
     * @return 专家服务分配
     */
    @Override
    public List<DoctorServer> selectDoctorServerList(DoctorServer doctorServer)
    {
        return doctorServerMapper.selectDoctorServerList(doctorServer);
    }

    @Override
    public List<DoctorServer> selectDoctorServerList(Long id) {
        DoctorServer doctorServer = null;
        doctorServer.setSid(id);
        return  doctorServerMapper.selectDoctorServerList(doctorServer);
    }

    /**
     * 新增专家服务分配
     * 
     * @param doctorServer 专家服务分配
     * @return 结果
     */
    @Override
    public int insertDoctorServer(DoctorServer doctorServer)
    {
        return doctorServerMapper.insertDoctorServer(doctorServer);
    }

    /**
     * 修改专家服务分配
     * 
     * @param doctorServer 专家服务分配
     * @return 结果
     */
    @Override
    public int updateDoctorServer(DoctorServer doctorServer)
    {
        return doctorServerMapper.updateDoctorServer(doctorServer);
    }

    /**
     * 批量删除专家服务分配
     * 
     * @param ids 需要删除的专家服务分配主键
     * @return 结果
     */
    @Override
    public int deleteDoctorServerByIds(String ids)
    {
        return doctorServerMapper.deleteDoctorServerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除专家服务分配信息
     * 
     * @param id 专家服务分配主键
     * @return 结果
     */
    @Override
    public int deleteDoctorServerById(Long id)
    {
        return doctorServerMapper.deleteDoctorServerById(id);
    }


}
